package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Question;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface QuestionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Question record);

    Question selectByPrimaryKey(Long id);

    List<Question> selectAll();

    int updateByPrimaryKey(Question record);

    List<Question> selectForList(QueryObject qo);

    void updateView(Long id);

    int getLikeCountByQuestionId(Long qid);

    void delFollow(Long qid);

    void remQuestionFollow(@Param("uid") Long uid, @Param("qid") Long qid);

    void addFollow(Long qid);

    void insQuestionFollow(@Param("uid") Long uid, @Param("qid") Long qid);

    Question getFollowQuestionById(@Param("uid") Long uid, @Param("qid") Long qid);

    void setCoverUrl(Question question);
}